<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmDigitKeyboard.cpp -->
  <title>QCtmDigitKeyboard Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmDigitKeyboard</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmDigitKeyboard Class</h1>
<!-- $$$QCtmDigitKeyboard-brief -->
<p>数字输入键盘. <a href="#details">More...</a></p>
<!-- @@@QCtmDigitKeyboard -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmDigitKeyboard.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qctmdialog.html">QCtmDialog</a></td></tr></table></div>
<ul>
<li><a href="qctmdigitkeyboard-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#QCtmDigitKeyboard">QCtmDigitKeyboard</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#dtor.QCtmDigitKeyboard">~QCtmDigitKeyboard</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#bindBox">bindBox</a></b>(QAbstractSpinBox *<i>box</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#currentUnitIndex">currentUnitIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#decimals">decimals</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmDigitKeyboard::InputMode </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#inputMode">inputMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#maximum">maximum</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#minimum">minimum</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setCurrentUnitIndex">setCurrentUnitIndex</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setDecimals">setDecimals</a></b>(int <i>decimals</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setInputMode">setInputMode</a></b>(QCtmDigitKeyboard::InputMode <i>mode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setMaximum">setMaximum</a></b>(const QVariant &amp;<i>max</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setMinimum">setMinimum</a></b>(const QVariant &amp;<i>min</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setRange">setRange</a></b>(const QVariant &amp;<i>min</i>, const QVariant &amp;<i>max</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setSingleStep">setSingleStep</a></b>(const QVariant &amp;<i>step</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setUnits">setUnits</a></b>(const QCtmDigitKeyboard::Units &amp;<i>units</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#setValue">setValue</a></b>(const QVariant &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#singleStep">singleStep</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QCtmDigitKeyboard::Units &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#units">units</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#value">value</a></b>() const</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#value-prop">valueChanged</a></b>(const QVariant &amp;<i>value</i>)</td></tr>
</table></div>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#simpleBindBox">simpleBindBox</a></b>(QAbstractSpinBox *<i>box</i>, const QCtmDigitKeyboard::Units &amp;<i>units</i> = {}, const QVariant &amp;<i>step</i> = {})</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#eventFilter">eventFilter</a></b>(QObject *<i>obj</i>, QEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#minimumSizeHint">minimumSizeHint</a></b>() const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qctmdigitkeyboard.html#sizeHint">sizeHint</a></b>() const override</td></tr>
</table></div>
<!-- $$$QCtmDigitKeyboard-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmDigitKeyboard -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmDigitKeyboard[overload1]$$$QCtmDigitKeyboardQWidget* -->
<h3 class="fn" id="QCtmDigitKeyboard">QCtmDigitKeyboard::<span class="name">QCtmDigitKeyboard</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>构造函数 <i>parent</i>.</p>
<!-- @@@QCtmDigitKeyboard -->
<!-- $$$~QCtmDigitKeyboard[overload1]$$$~QCtmDigitKeyboard -->
<h3 class="fn" id="dtor.QCtmDigitKeyboard"><code>[virtual] </code>QCtmDigitKeyboard::<span class="name">~QCtmDigitKeyboard</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmDigitKeyboard -->
<!-- $$$bindBox[overload1]$$$bindBoxQAbstractSpinBox* -->
<h3 class="fn" id="bindBox"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">bindBox</span>(<span class="type"><a href="https://doc.qt.io/qt/qabstractspinbox.html">QAbstractSpinBox</a></span> *<i>box</i>)</h3>
<p>绑定到 <a href="https://doc.qt.io/qt/qspinbox.html">QSpinBox</a>/<a href="https://doc.qt.io/qt/qdoublespinbox.html">QDoubleSpinBox</a> <i>box</i>.</p>
<!-- @@@bindBox -->
<!-- $$$currentUnitIndex[overload1]$$$currentUnitIndex -->
<h3 class="fn" id="currentUnitIndex"><span class="type">int</span> QCtmDigitKeyboard::<span class="name">currentUnitIndex</span>() const</h3>
<p>返回当前选中的单位序号.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setCurrentUnitIndex">setCurrentUnitIndex</a>.</p>
<!-- @@@currentUnitIndex -->
<!-- $$$decimals -->
<h3 class="fn" id="decimals"><span class="type">int</span> QCtmDigitKeyboard::<span class="name">decimals</span>() const</h3>
<p>返回小数点后保留位数.</p>
<p><b>Note: </b>Getter function for property decimals. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setDecimals">setDecimals</a>.</p>
<!-- @@@decimals -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn" id="eventFilter"><code>[override virtual protected] </code><span class="type">bool</span> QCtmDigitKeyboard::<span class="name">eventFilter</span>(<span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject">QObject</a></span> *<i>obj</i>, <span class="type"><a href="https://doc.qt.io/qt/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="qctmdialog.html#eventFilter">QCtmDialog::eventFilter</a>(QObject *o, QEvent *e).</p>
<!-- @@@eventFilter -->
<!-- $$$inputMode[overload1]$$$inputMode -->
<h3 class="fn" id="inputMode"><span class="type">QCtmDigitKeyboard::InputMode</span> QCtmDigitKeyboard::<span class="name">inputMode</span>() const</h3>
<p>返回输入模式.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setInputMode">setInputMode</a>.</p>
<!-- @@@inputMode -->
<!-- $$$maximum -->
<h3 class="fn" id="maximum"><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmDigitKeyboard::<span class="name">maximum</span>() const</h3>
<p>返回输入最大值.</p>
<p><b>Note: </b>Getter function for property maximum. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setMaximum">setMaximum</a>.</p>
<!-- @@@maximum -->
<!-- $$$minimum -->
<h3 class="fn" id="minimum"><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmDigitKeyboard::<span class="name">minimum</span>() const</h3>
<p>返回输入最小值.</p>
<p><b>Note: </b>Getter function for property minimum. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setMinimum">setMinimum</a>.</p>
<!-- @@@minimum -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn" id="minimumSizeHint"><code>[override virtual protected] </code><span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> QCtmDigitKeyboard::<span class="name">minimumSizeHint</span>() const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qdialog.html#minimumSizeHint">QDialog::minimumSizeHint() const</a>.</p>
<!-- @@@minimumSizeHint -->
<!-- $$$setCurrentUnitIndex[overload1]$$$setCurrentUnitIndexint -->
<h3 class="fn" id="setCurrentUnitIndex"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setCurrentUnitIndex</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>设置当前选中的单位序号 <i>index</i>.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#currentUnitIndex">currentUnitIndex</a>.</p>
<!-- @@@setCurrentUnitIndex -->
<!-- $$$setDecimals -->
<h3 class="fn" id="setDecimals"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setDecimals</span>(<span class="type">int</span> <i>decimals</i>)</h3>
<p>设置小数点后保留位数 <i>decimals</i>.</p>
<div class="admonition note">
<p><b>Note: </b>该方法仅 InputMode::DoubleInput 有效.</p>
</div>
<p><b>Note: </b>Setter function for property <a href="qctmdigitkeyboard.html#decimals">decimals</a>. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#decimals">decimals</a>.</p>
<!-- @@@setDecimals -->
<!-- $$$setInputMode[overload1]$$$setInputModeQCtmDigitKeyboard::InputMode -->
<h3 class="fn" id="setInputMode"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setInputMode</span>(<span class="type">QCtmDigitKeyboard::InputMode</span> <i>mode</i>)</h3>
<p>设置输入模式 <i>mode</i>.</p>
<div class="admonition note">
<p><b>Note: </b>仅在键盘窗口未显示之前设置有效，显示之后调用该方法将被忽略.</p>
</div>
<p><b>See also </b><a href="qctmdigitkeyboard.html#inputMode">inputMode</a>.</p>
<!-- @@@setInputMode -->
<!-- $$$setMaximum -->
<h3 class="fn" id="setMaximum"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setMaximum</span>(const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>max</i>)</h3>
<p>设置输入最大值 <i>max</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmdigitkeyboard.html#maximum">maximum</a>. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#maximum">maximum</a>.</p>
<!-- @@@setMaximum -->
<!-- $$$setMinimum -->
<h3 class="fn" id="setMinimum"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setMinimum</span>(const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>min</i>)</h3>
<p>设置输入最小值 <i>min</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmdigitkeyboard.html#minimum">minimum</a>. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#minimum">minimum</a>.</p>
<!-- @@@setMinimum -->
<!-- $$$setRange[overload1]$$$setRangeconstQVariant&constQVariant& -->
<h3 class="fn" id="setRange"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setRange</span>(const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>min</i>, const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>max</i>)</h3>
<p>设置输入范围 <i>min</i>, <i>max</i>.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setMaximum">setMaximum</a> and <a href="qctmdigitkeyboard.html#setMinimum">setMinimum</a>.</p>
<!-- @@@setRange -->
<!-- $$$setSingleStep -->
<h3 class="fn" id="setSingleStep"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setSingleStep</span>(const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>step</i>)</h3>
<p>设置步进值 <i>step</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmdigitkeyboard.html#singleStep">singleStep</a>. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#singleStep">singleStep</a>.</p>
<!-- @@@setSingleStep -->
<!-- $$$setUnits[overload1]$$$setUnitsconstQCtmDigitKeyboard::Units& -->
<h3 class="fn" id="setUnits"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setUnits</span>(const <span class="type">QCtmDigitKeyboard::Units</span> &amp;<i>units</i>)</h3>
<p>设置可选单位列表 <i>units</i>.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#units">units</a>.</p>
<!-- @@@setUnits -->
<!-- $$$setValue -->
<h3 class="fn" id="setValue"><span class="type">void</span> QCtmDigitKeyboard::<span class="name">setValue</span>(const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>value</i>)</h3>
<p>设置输入窗口中的值 <i>value</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmdigitkeyboard.html#value">value</a>. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#value">value</a>.</p>
<!-- @@@setValue -->
<!-- $$$simpleBindBox[overload1]$$$simpleBindBoxQAbstractSpinBox*constQCtmDigitKeyboard::Units&constQVariant& -->
<h3 class="fn" id="simpleBindBox"><code>[static] </code><span class="type">void</span> QCtmDigitKeyboard::<span class="name">simpleBindBox</span>(<span class="type"><a href="https://doc.qt.io/qt/qabstractspinbox.html">QAbstractSpinBox</a></span> *<i>box</i>, const <span class="type">QCtmDigitKeyboard::Units</span> &amp;<i>units</i> = {}, const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>step</i> = {})</h3>
<p>打开 <i>box</i> 的数字键盘，单位列表为 <i>units</i>, 步进为 <i>step</i>, 输入完成后销毁数字键盘.</p>
<!-- @@@simpleBindBox -->
<!-- $$$singleStep -->
<h3 class="fn" id="singleStep"><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmDigitKeyboard::<span class="name">singleStep</span>() const</h3>
<p>返回步进值.</p>
<p><b>Note: </b>Getter function for property singleStep. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setSingleStep">setSingleStep</a>.</p>
<!-- @@@singleStep -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn" id="sizeHint"><code>[override virtual protected] </code><span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> QCtmDigitKeyboard::<span class="name">sizeHint</span>() const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qdialog.html#sizeHint">QDialog::sizeHint() const</a>.</p>
<!-- @@@sizeHint -->
<!-- $$$units[overload1]$$$units -->
<h3 class="fn" id="units">const <span class="type">QCtmDigitKeyboard::Units</span> &amp;QCtmDigitKeyboard::<span class="name">units</span>() const</h3>
<p>返回可选单位列表.</p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setUnits">setUnits</a>.</p>
<!-- @@@units -->
<!-- $$$value -->
<h3 class="fn" id="value"><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmDigitKeyboard::<span class="name">value</span>() const</h3>
<p>返回输入的值.</p>
<p><b>Note: </b>Getter function for property value. </p>
<p><b>See also </b><a href="qctmdigitkeyboard.html#setValue">setValue</a>.</p>
<!-- @@@value -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
